package offer.singleton;

/**
 * Description：
 * Author: zhangc
 * Date：2017/7/18 10:19
 */
public class Singleton {
    private static Singleton ourInstance = new Singleton();

    private static int val = 0;

    public static Singleton getInstance() {
        return ourInstance;
    }

    private Singleton() {
    }

    public static int addVal(){
        return ++val;
    }
}
